package springbootrest.demo.analyze;

import org.springframework.context.annotation.Import;
import org.springframework.context.annotation.ImportSelector;
import org.springframework.core.type.AnnotationMetadata;
import springbootrest.demo.analyze.bean.ImportAnalyzeDemoBeanA;

import java.util.Map;
import java.util.Set;

/**
 * @author songZiHao
 * @version 1.0.0
 * @ClassName MyImportSelectorImpl.java
 * @Description {@link ImportSelector}实现
 * @createTime 2019年10月27日 14:04:00
 */
public class MyImportSelectorImpl implements ImportSelector {
    @Override
    public String[] selectImports(AnnotationMetadata annotationMetadata) {
        System.out.println("当前引入的类是MyImportSelectorImpl，这里将beanA进行返回让容器注入");
        return new String[]{ImportAnalyzeDemoBeanA.class.getName()};
    }
}
